package com.snail.billing.util;

import android.content.Context;
import android.content.SharedPreferences;

import com.android.os.MyEngine;
import com.android.util.BaseConfiguration;

public class BillingConfiguration extends BaseConfiguration {

	public BillingConfiguration() {
		super(MyEngine.getEngine().getApplicationContext());
	}

	protected SharedPreferences getSharedPreferences(Context context) {
		return context.getSharedPreferences(context.getPackageName() + ".Billing", Context.MODE_PRIVATE);
	}

	public String getUUID() {
		return getString("uuid", "");
	}

	public void setUUID(String uuid) {
		putString("uuid", uuid, true);
	}

	public String getAccount() {
		return getString("account", "");
	}

	public void setAccount(String account) {
		putString("account", account, true);
	}

	public String getCurrentAccount() {
		return getString("currentAccount", "");
	}

	public void setCurrentAccount(String account) {
		putString("currentAccount", account, true);
	}

	public long getQuestionSplit() {
		return getLong("questionSplit", 0);
	}

	public void setQuestionSplit(long time) {
		putLong("questionSplit", time, true);
	}
}
